package com.kun.gulimall.guliproduct.query;

import com.kun.gulimall.domain.PageQuery;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.URL;

@EqualsAndHashCode(callSuper = true)
@Data
public class BrandQuery extends PageQuery {

    private Long brandId;

    @NotBlank(message = "品牌名必须提交")
    private String name;

    @URL(message = "必须是合法的URL", protocol = "https")
    @NotBlank(message = "logo必须提交")
    private String logo;

    private String descript;

    private Boolean showStatus;

    @Pattern(regexp = "^[a-zA-Z]$", message = "必须是一个字母")
    private String firstLetter;

    @Min(value = 0, message = "排序必须大于等于0")
    private Integer sort;

}
